import request from "@/utils/request";
// 小程序创建家庭
export function createFamily(data) {
	return request({
		url: `/pet/family/app/create`,
		headers: {
			isToken: true,
		},
		method: "post",
		data
	});
}
// 小程序获取家庭列表
export function getFamilyList(params) {
	return request({
		url: `/pet/family/app/list`,
		headers: {
			isToken: true,
		},
		method: "get",
		params
	});
}
//小程序查看家庭成员列表
export function getFamilyMemberList(params) {
	return request({
		url: `/pet/family_members/app/list`,
		headers: {
			isToken: true,
		},
		method: "get",
		params
	});
}
//小程序加入家庭
export function joinFamily(data) {
	return request({
		url: `/pet/family/app/invite`,
		headers: {
			isToken: true,
		},
		method: "post",
		data
	});
}
//小程序删除家庭成员delete方法
export function deleteFamilyMember(data) {
    return request({
        url: `/pet/family_members/app/delete`,
        headers: {
            isToken: true,
        },
        method: "post",
        data
    });
}
//小程序解散家庭
export function disbandFamily(id) {
	return request({
		url: `/pet/family/app/dismiss/${id}`,
		headers: {
			isToken: true,
		},
		method: "post",
	});
}




